<!--
 * @Description: 
 * @Author: 赵华宇
 * @Date: 2024-11-13 20:10:42
 * @LastEditors: 赵华宇
 * @LastEditTime: 2024-11-13 21:26:08
-->
<template>
    <div class="form-container">
       用户名<input v-model="username" type="text" placeholder="请输入用户名">
       <br>
       密码<input v-model="password" type="text" placeholder="请输入密码" @keyup.enter="login">
       <br>
       <button @click="login">登录</button>
    </div>
</template>
<script setup>
    import{ref}from 'vue'
    const username=ref("");
    const password=ref("");
    function login(){
        if(username.value==="admin"&&password.value==="123"){
            alert("登录成功");
        }else{
            alert("登录失败");
        }
    }
</script>
<style scoped>
.form-container {
  background-color: rgba(255, 255, 255, 0.7); /* 半透明白色背景 */
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 100%;
}
</style>
